<!DOCTYPE html><html>
<head>
<title>Test</title>
</head>
<body>
<p>Test the custom sprite.js events. Use up,down,right,left,space,enter,0,1,esc</p>
</body>
<script src="../sprite.js"></script>
<script src="../lib/collision.js"></script>
<script>
window.onload = function() {

    sjs.debug = true;

    var game_height = 200;
    var game_width = 400;
    var scene = sjs.Scene({w:game_width, h:game_height});
    var layer = scene.Layer("name", {useCanvas:false});

    var input = scene.Input();
    input.enableCustomEvents = true;

    var listener = function(event) {
        sjs.log(event.type, event.value);
    }

    input.dom.addEventListener("sjsup", listener, false);
    input.dom.addEventListener("sjsdown", listener, false);
    input.dom.addEventListener("sjsleft", listener, false);
    input.dom.addEventListener("sjsright", listener, false);

    input.dom.addEventListener("sjsspace", listener, false);
    input.dom.addEventListener("sjsenter", listener, false);

    input.dom.addEventListener("sjs0", listener, false);
    input.dom.addEventListener("sjs1", listener, false);
    input.dom.addEventListener("sjsesc", listener, false);


};
</script>
</html>
